using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Web.Configuration;

/// <summary>
/// Summary description for SQLDBHelper
/// </summary>
public class SQLDBHelper
{
    private string connString;
    protected SqlConnection conn;

    public SQLDBHelper()
    {
        connString = WebConfigurationManager.ConnectionStrings["connString"].ConnectionString;
    }

    public void Connect()
    {
        conn = new SqlConnection(connString);
        try
        {
            conn.Open();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

    public void Disconnect()
    {
        if (conn.State == ConnectionState.Open)
        {
            conn.Close();
        }
    }
}
